home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload Trio 2 / Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO / dir39 / cmos16.zip / CHKCMOS.BAT next >
DOS Batch File  |  1994-08-28  |  2KB  |  62 lines

  1. @ECHO OFF
  2. ::REM CHKCMOS.BAT -- ensures CMOS not damaged, repairs if it is.
  3.  
  4. ::REM last updated by Roedy Green of Canadian Mind Products 94/08/04
  5. ::REM Insert to this in AUTOEXEC.BAT to check CMOS.
  6.  
  7. ::REM For this bat file to work you must first SET EXEDIR=C:\SYS or whereever
  8. ::REM you keep your utilities.
  9. ::REM You will need NEED.com CMOSChk.com CMOSSave.com and Reboot.com
  10. ::REM These are shareware utilities from Canadian Mind Products.
  11. ::REM The directory C:\SAFE must exist.
  12.  
  13. ::REM  Only check CMOS on the AT-style BIOS
  14. %EXEDIR%\NEED.COM AT > NUL:
  15. IF Errorlevel 1 GOTO DONE
  16.  
  17. IF NOT EXIST C:\SAFE\CMOS.SAV GoTo MakeIt
  18.  
  19. %EXEDIR%\CMOSChk.COM C:\SAFE\CMOS.SAV
  20. IF NOT Errorlevel 1 GOTO DONE
  21.  
  22. ::REM CMOS check failed:
  23. ::REM could be 2 reasons:
  24.  
  25. ::REM 1. CMOS has been illegitimately tampered with
  26.  
  27. ::REM 2. CMOS has been deliberately changed,
  28. ::REM    Clever user will have to abort, and delete C:\SAFE\CMOS.SAV
  29. ::REM    or delete before before making changes. 
  30. ::REM    A new CMOS.SAV will be automatically
  31. ::REM    generated.  It should be copied to the rescue diskette.
  32.  
  33. ::REM Warn consultants confounded by CMOSREST undoing their CMOS changes.
  34.  
  35. Echo.To deliberately change CMOS, see the instructions in C:\BAT\CHKCMOS.BAT.
  36. Echo.
  37. Echo.Abort now with Ctrl-Break if you do not wish to restore damaged CMOS.
  38. Echo.Normally you should just hit the SPACE BAR to repair CMOS.
  39. Pause
  40.  
  41. ::REM try restoring
  42.  
  43. %EXEDIR%\CMOSREST.COM C:\SAFE\CMOS.SAV
  44. IF NOT Errorlevel 1 GOTO Reboot
  45. Echo CMOS is still corrupted
  46. Pause
  47. :Reboot
  48. %EXEDIR%\Reboot.Com
  49.  
  50. :MakeIt
  51.  
  52. ::REM Build a NEW CMOS.SAV file
  53. Echo Recreating C:\SAFE\CMOS.SAV file.
  54. %EXEDIR%\MD! C:\SAFE
  55. %EXEDIR%\CMOSSAVE.COM C:\SAFE\CMOS.SAV
  56. Echo You might also want to create a new A: Rescue floppy boot disk soon
  57. Echo Use CMOSSAVE A:\CMOS.SAV
  58. Pause
  59.  
  60. :DONE
  61. ::REM -30-
  62.